博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
phpcms导航栏多个栏目调用
阅读量:6863 次
发布时间:2019-06-26

本文共 1899 字,大约阅读时间需要 6 分钟。

做网站时用的到的简单的栏目导航()

phpcms多个栏目catid in(9,10,11)可以修改id

排序order by listorder ASC/DESC

{if}...{/if}为判断点击为栏目

下面是一种例子

html:

    {pc:get sql="select * from v9_category where catid in(9,10,17,11,12,13,14,15) order by listorder ASC" siteid="$siteid" return="data"} {loop $data $r}
    {/loop}{/pc}

css:

.navb{
float: left; height: 38px; line-height: 38px; margin-top: 4px; width: 99px;}.nabout{
color:#fff; font-size:14px; display:inline-block; width:99px; text-align:center; text-decoration:none; height:38px;line-height:38px; font-weight:bold; }.nabout:hover{
width:99px; color:#067300; background:url(navb.jpg) repeat-x; display:inline-block; height:45px;line-height:38px; text-decoration:none; margin:0px; font-weight:bold;}.nhome{
width:99px; color:#fff; /*background:url(navb.jpg) repeat-x;*/ display:inline-block; height:45px;line-height:38px; margin:0px; text-decoration:none; font-size:14px;font-weight:bold; }.nhome:hover{
text-decoration:none; display:inline-block; width:99px; color:#067300; font-size:14px; background:url(navb.jpg) repeat-x; height:45px; line-height:38px;font-weight:bold; }.hover{
width:99px; color:#067300; background:url(navb.jpg) repeat-x; display:inline-block; height:45px;line-height:38px; text-decoration:none; margin:0px; font-weight:bold; font-size:14px;} .hover:hover{
text-decoration:none; display:inline-block; width:99px; color:#067300; font-size:14px; background:url(navb.jpg) repeat-x; height:45px; line-height:38px;font-weight:bold; }

效果:

转载于:https://www.cnblogs.com/chervehong/p/10373277.html

你可能感兴趣的文章
grep小练习
查看>>
英语文章、常用短语部分摘选集锦
查看>>
ADMT3.2域迁移之Server2003至Server2012系列(七)安装ADMT3.2
查看>>
DISPLAY环境变量的作用
查看>>
006.递归和分治思想
查看>>
org.springframework.data.mapping.PropertyReferenceException: No property xxxx found for type Xxxx
查看>>
Gson解析json数据 亲自测试可用
查看>>
我与监控宝之间的点点滴滴
查看>>
delphi 数据库显示的TDBGrid配置
查看>>
对51CTO的看法
查看>>
userenv和sys_context函数
查看>>
是否会回到起点.回忆只能是回忆
查看>>
原创数据结构算法Flash动画演示课件-Action Script(AS)脚本实现
查看>>
基于Mysql主从同步的读写分离
查看>>
BA 的岗位要求3
查看>>
基于Hyper-V3.0搭建XenDesktop7之九 部署虚拟应用之模板准备
查看>>
JS如何捆绑TypeScript声明文件
查看>>
samba服务配置
查看>>
我的友情链接
查看>>
MyBatis之ResultMap标签
查看>>